local timerManager = {}
timerManager.timers = {}

timerManager.add = function(name, timer)
	timerManager.timers[name] = timer 
end

timerManager.get = function(name)
	return timerManager.timers[name]
end

timerManager.pause = function(name)
	timer.pause(timerManager.timers[name])
end

timerManager.resume = function(name)
	if(timerManager.timers[name] ~= nil) then
		timer.resume(timerManager.timers[name])
	end
end

timerManager.cancelAll = function()
    local k, v
	 
    for k,v in pairs(timerManager.timers) do
        timer.cancel( v )
        v = nil; k = nil
    end

    timerManager.timers = nil
    timerManager = nil
    timerManager = {}
    timerManager.timers = {}
end

return timerManager